package com.jhhc.StormSurgeForecast.StormSurge.Uitl;

import com.jhhc.StormSurgeForecast.StormSurge.Pojo.GZABO.ColourInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ColourUtil
 */
public class ColourUtil {


    public static List<Short> colourClassification(int dttp,String[] values,List<ColourInfo> colourInfos){
        List<Short> colour = new ArrayList<>();
        switch (dttp){
            case 1:
                for (String s : values) {
                    colour.add(JudgeUtil.colorJudge(s,colourInfos));
                }
                break;
            case 4:
                for (String s : values) {
                    colour.add(JudgeUtil.colorJudge4(Integer.parseInt(s)));
                }
                break;
            case 6:
                for (String s : values) {
                    colour.add(JudgeUtil.colorJudge6(Integer.parseInt(s)));
                }
                break;
            case 1101:
                for (String s : values) {
                    colour.add(JudgeUtil.colorJudge1101((double) Integer.parseInt(s) / 100000));
                }
                break;
        }
        return colour;
    }
}
